﻿using System;
using Core.Model;
using Core.View.Renders;
using SlimDX.Game.View.Builders;
using SlimDX.Game.View.Renders;
using SlimDX.Windows;

namespace SlimDX.Game
{
    public class GameCicle:IDisposable
    {
        private World World;

        public void Run()
        {
            SlimDxWordRenderer renderer = SlimDxWordRenderer.Create();

            World = new World(renderer, new SlimDxChunkBuilder(renderer._device), null, null);

            MessagePump.Run(renderer.RenderForm, Cicle);
        }

        private void Cicle()
        {
            World.Update();

            World.Draw();
        }

        public void Dispose()
        {
        }
    }
}
